<form-container left-column-width="120px">
  <loading ng-if="isWaitingCreate"></loading>
  <form name="createVolume">
    <form-config-group>
      <form-config-item config-title="数据卷名称" required="required">
        <form-input-container help-text="在同一个集群内不可重复。">
          <input name="volumeName" type="text" placeholder="输入名称" ng-model="volume.name" cluster-id="{{volume.clusterId}}" required="required" is-volume-unique="is-volume-unique" ng-model-options="{updateOn:'default blur',debounce:{default:1000,blur:0}}" />
          <form-error-message form="createVolume" target="volumeName" type="required">名称不能为空</form-error-message>
          <form-error-message form="createVolume" target="volumeName" type="isVolumeUnique">名称重复</form-error-message></form-input-container>
      </form-config-item>
    </form-config-group>
    <form-config-group>
      <form-config-item config-title="描述">
        <form-input-container>
          <textarea ng-model="volume.description" style="padding: 6px 20px;line-height:20px;display: block;"></textarea>
        </form-input-container>
      </form-config-item>
    </form-config-group>
    <form-config-group>
      <form-config-item config-title="集群" required="required">
        <form-input-container help-text="关联集群后，可在该集群挂载存储。">
          <form-select name="clusterSelect" ng-model="volume.clusterId" options="clusterOption" placeholder="选择集群" on-change="initNamespace(volume.clusterId)" required="required" empty-text="无相关信息"></form-select>
        </form-input-container>
      </form-config-item>
    </form-config-group>
    <form-config-group>
      <form-config-item config-title="namespace" required="required">
        <form-input-container help-text="关联集群后，可在该集群挂载存储。">
          <form-select name="namespaceSelect" ng-model="volume.namespace" options="namespaceOption" placeholder="选择namespace" required="required" empty-text="无相关信息"></form-select>
        </form-input-container>
      </form-config-item>
    </form-config-group>
    <form-config-group>
      <form-config-item config-title="容量" required="required">
        <form-input-container>
          <input name="capacity" type="number" step="0.1" ng-model="volume.capacity" required="required" style="width:30%;" ng-pattern="/^(\d?\.)?\d+$/" is-over="is-over" max="10" min="0" />
          <span>&nbsp;G</span>
          <form-error-message form="createVolume" target="capacity" type="pattern">请输入0到10之间的数字，且不能为空</form-error-message></form-input-container>
      </form-config-item>
    </form-config-group>
    <form-config-group>
      <form-config-item>
        <button type="button" ng-click="cancel()" style="margin-right:15px;">取消</button>
        <form-submit-button form="createVolume" ng-disabled="isWaitingCreate" on-submit="createStorageVolumeSubmit()">提交</form-submit-button></form-config-item>
    </form-config-group>
  </form>
</form-container>